home *** CD-ROM | disk | FTP | other *** search
/ Freelog 117 / FreelogNo117-OctobreNovembre2013.iso / Programmation / jedit / jedit5.1.0install.exe / {app} / modes / latex.xml < prev    next >
Extensible Markup Language  |  2013-07-28  |  9KB  |  246 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE MODE SYSTEM "xmode.dtd">
  3.  
  4. <!-- jEdit LaTeX mode
  5.   written by: Michael Schlotter, m.schlotter@bath.ac.uk
  6.   latex.xml, v1.4.2, 26 November 2009
  7.   
  8.   Suggested catalog entry:
  9.   <MODE NAME="latex" FILE="latex.xml"
  10.     FILE_NAME_GLOB="*.{tex,ltx,latex,sty,cls}" />
  11. -->
  12.  
  13. <MODE>
  14.   <PROPS>
  15.     <!-- comments, word separators -->
  16.     <PROPERTY NAME="lineComment" VALUE="%" />
  17.     <PROPERTY NAME="wordBreakChars" VALUE="" />
  18.     <PROPERTY NAME="noWordSep" VALUE="\@_-:*<>" />
  19.     
  20.     <!-- indenting -->
  21.      
  22.     <PROPERTY NAME="deepIndent" VALUE="FALSE" />
  23.     <PROPERTY NAME="doubleBracketIndent" VALUE="FALSE" />
  24.     <PROPERTY NAME="lineUpClosingBrackets" VALUE="FALSE" />
  25.     <!-- Commented out due to # 3432974 
  26.     <PROPERTY NAME="indentOpenBrackets" VALUE="{[" />
  27.     <PROPERTY NAME="indentCloseBrackets" VALUE="]}" />
  28.     <PROPERTY NAME="indentNextLines" VALUE="^.*(\\begin\s*\{.*)$" />
  29.     <PROPERTY NAME="unindentThisLine" VALUE="^[ \t]*(\\item.*|\\end\s*\{.*)$" />
  30.     <PROPERTY NAME="unindentNextLines" VALUE="^.*(\\end\s*\{.*)$" />
  31.     <PROPERTY NAME="electricKeys"
  32.               VALUE="{abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" />
  33.     -->
  34.     <PROPERTY NAME="unalignedOpenBrackets" VALUE="(" />
  35.     <PROPERTY NAME="unalignedCloseBrackets" VALUE=")" />
  36.     
  37.     
  38.   </PROPS>
  39.   
  40.   <!-- default rules -->
  41.   <RULES
  42.     IGNORE_CASE="FALSE"
  43.     NO_WORD_SEP="@_-:*"
  44.     HIGHLIGHT_DIGITS="FALSE">
  45.     
  46.     <!-- \verb|sometext|; any delimeter except * can be used -->
  47.     <SPAN_REGEXP TYPE="KEYWORD2" DELEGATE="VerbatimRules"
  48.         HASH_CHAR="\" NO_LINE_BREAK="TRUE">
  49.       <BEGIN>.verb[\*]?([\p{Punct}&&[^*]])</BEGIN>
  50.       <END>$1</END>
  51.     </SPAN_REGEXP>
  52.     
  53.     <!-- verbatim environments -->
  54.     <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
  55.       <BEGIN>\begin{verbatim*}</BEGIN><END>\end{verbatim*}</END>
  56.     </SPAN>
  57.     <SPAN TYPE="KEYWORD1" DELEGATE="VerbatimRules">
  58.       <BEGIN>\begin{verbatim}</BEGIN><END>\end{verbatim}</END>
  59.     </SPAN>
  60.     
  61.     <!-- mathematical environments, including AMS definitions -->
  62.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  63.       <BEGIN>$$</BEGIN><END>$$</END>
  64.     </SPAN>
  65.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  66.       <BEGIN>$</BEGIN><END>$</END>
  67.     </SPAN>
  68.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  69.       <BEGIN>\(</BEGIN><END>\)</END>
  70.     </SPAN>
  71.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  72.       <BEGIN>\[</BEGIN><END>\]</END>
  73.     </SPAN>
  74.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  75.       <BEGIN>\begin{math}</BEGIN><END>\end{math}</END>
  76.     </SPAN>
  77.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  78.       <BEGIN>\begin{displaymath}</BEGIN><END>\end{displaymath}</END>
  79.     </SPAN>
  80.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  81.       <BEGIN>\begin{equation*}</BEGIN><END>\end{equation*}</END>
  82.     </SPAN>
  83.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  84.       <BEGIN>\begin{equation}</BEGIN><END>\end{equation}</END>
  85.     </SPAN>
  86.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  87.       <BEGIN>\begin{eqnarray*}</BEGIN><END>\end{eqnarray*}</END>
  88.     </SPAN>
  89.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  90.       <BEGIN>\begin{eqnarray}</BEGIN><END>\end{eqnarray}</END>
  91.     </SPAN>
  92.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  93.       <BEGIN>\begin{align*}</BEGIN><END>\end{align*}</END>
  94.     </SPAN>
  95.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  96.       <BEGIN>\begin{align}</BEGIN><END>\end{align}</END>
  97.     </SPAN>
  98.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  99.       <BEGIN>\begin{alignat*}</BEGIN><END>\end{alignat*}</END>
  100.     </SPAN>
  101.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  102.       <BEGIN>\begin{alignat}</BEGIN><END>\end{alignat}</END>
  103.     </SPAN>
  104.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  105.       <BEGIN>\begin{flalign*}</BEGIN><END>\end{flalign*}</END>
  106.     </SPAN>
  107.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  108.       <BEGIN>\begin{flalign}</BEGIN><END>\end{flalign}</END>
  109.     </SPAN>
  110.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  111.       <BEGIN>\begin{gather*}</BEGIN><END>\end{gather*}</END>
  112.     </SPAN>
  113.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  114.       <BEGIN>\begin{gather}</BEGIN><END>\end{gather}</END>
  115.     </SPAN>
  116.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  117.       <BEGIN>\begin{multline*}</BEGIN><END>\end{multline*}</END>
  118.     </SPAN>
  119.     <SPAN TYPE="KEYWORD1" DELEGATE="MathRules">
  120.       <BEGIN>\begin{multline}</BEGIN><END>\end{multline}</END>
  121.     </SPAN>
  122.     
  123.     <!-- labels - includes all commands ending with `ref' and `*ref' -->
  124.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  125.       <BEGIN>\label{</BEGIN><END>}</END>
  126.     </SPAN>
  127.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  128.       <BEGIN>\cite{</BEGIN><END>}</END>
  129.     </SPAN>
  130.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  131.       <BEGIN>\hyperlink{</BEGIN><END>}</END>
  132.     </SPAN>
  133.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  134.       <BEGIN>\hypertarget{</BEGIN><END>}</END>
  135.     </SPAN>
  136.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  137.       <BEGIN>\url{</BEGIN><END>}</END>
  138.     </SPAN>
  139.     <SPAN_REGEXP TYPE="KEYWORD4" DELEGATE="LabelRules"
  140.         HASH_CHAR="\" NO_LINE_BREAK="TRUE">
  141.       <BEGIN>.[\p{Alnum}]*ref[\*]?\{</BEGIN>
  142.       <END>}</END>
  143.     </SPAN_REGEXP>
  144.     
  145.     <!-- escaped characters which are treated as normal text -->
  146.     <SEQ TYPE="NULL">\&</SEQ>
  147.     <SEQ TYPE="NULL">\$</SEQ>
  148.     <SEQ TYPE="NULL">\%</SEQ>
  149.     <SEQ TYPE="NULL">\#</SEQ>
  150.     <SEQ TYPE="NULL">\_</SEQ>
  151.     <SEQ TYPE="NULL">\{</SEQ>
  152.     <SEQ TYPE="NULL">\}</SEQ>
  153.     
  154.     <!-- tabbing tokens (or accents, depending on environment) -->
  155.     <SEQ TYPE="KEYWORD2">\=</SEQ>
  156.     <SEQ TYPE="KEYWORD2">\></SEQ>
  157.     <SEQ TYPE="KEYWORD2">\<</SEQ>
  158.     <SEQ TYPE="KEYWORD2">\+</SEQ>
  159.     <SEQ TYPE="KEYWORD2">\-</SEQ>
  160.     <SEQ TYPE="KEYWORD2">\'</SEQ>
  161.     <SEQ TYPE="KEYWORD2">\`</SEQ>
  162.     
  163.     <!-- more accents incl. those specific to tabbing environment -->
  164.     <SEQ TYPE="KEYWORD2">\^</SEQ>
  165.     <SEQ TYPE="KEYWORD2">\"</SEQ>
  166.     <SEQ TYPE="KEYWORD2">\~</SEQ>
  167.     <SEQ TYPE="KEYWORD2">\.</SEQ>
  168.     <SEQ TYPE="KEYWORD2">\a'</SEQ>
  169.     <SEQ TYPE="KEYWORD2">\a`</SEQ>
  170.     <SEQ TYPE="KEYWORD2">\a=</SEQ>
  171.     
  172.     <!-- special tokens: macro parameter, linebreak, alignment tab -->
  173.     <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
  174.     <SEQ TYPE="KEYWORD3">\\</SEQ>
  175.     <SEQ TYPE="KEYWORD3">&</SEQ>
  176.     
  177.     <!-- comments -->
  178.     <SPAN TYPE="COMMENT2">
  179.       <BEGIN>\iffalse</BEGIN><END>\fi</END>
  180.     </SPAN>
  181.     <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
  182.     
  183.     <!-- quotes, including those defined by package `(n)german' -->
  184.     <SPAN_REGEXP TYPE="LITERAL1"><BEGIN>``</BEGIN><END REGEXP="TRUE">''|"</END></SPAN_REGEXP>
  185.     <SPAN TYPE="LITERAL1"><BEGIN>"`</BEGIN><END>"'</END></SPAN>
  186.     <SPAN TYPE="LITERAL1"><BEGIN>"<</BEGIN><END>"></END></SPAN>
  187.     <SPAN TYPE="LITERAL1"><BEGIN>\glqq</BEGIN><END>\grqq</END></SPAN>
  188.     <SPAN TYPE="LITERAL1"><BEGIN>\glq</BEGIN><END>\grq</END></SPAN>
  189.     <SPAN TYPE="LITERAL1"><BEGIN>\flqq</BEGIN><END>\frqq</END></SPAN>
  190.     <SPAN TYPE="LITERAL1"><BEGIN>\flq</BEGIN><END>\frq</END></SPAN>
  191.     
  192.     <!-- environment delimeters: \begin{...} ... \end{...} -->
  193.     <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
  194.       >(.begin\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
  195.     <SEQ_REGEXP HASH_CHAR="\" TYPE="KEYWORD1"
  196.       >(.end\{([\p{Alnum}|@|\*]*)\})</SEQ_REGEXP>
  197.     
  198.     <!-- \... commands -->
  199.     <MARK_FOLLOWING TYPE="KEYWORD2">\</MARK_FOLLOWING>
  200.     
  201.     <!-- group delimeters -->
  202.     <SEQ TYPE="KEYWORD4">{</SEQ>
  203.     <SEQ TYPE="KEYWORD4">}</SEQ>
  204.     <SEQ TYPE="KEYWORD4">[</SEQ>
  205.     <SEQ TYPE="KEYWORD4">]</SEQ>
  206.   </RULES>
  207.   
  208.   <!-- math rules -->
  209.   <RULES
  210.     SET="MathRules"
  211.     DEFAULT="LITERAL2"
  212.     IGNORE_CASE="FALSE"
  213.     NO_WORD_SEP="@:"
  214.     HIGHLIGHT_DIGITS="FALSE">
  215.     
  216.     <!-- labels -->
  217.     <SPAN TYPE="KEYWORD4" DELEGATE="LabelRules" NO_LINE_BREAK="TRUE">
  218.       <BEGIN>\label{</BEGIN><END>}</END>
  219.     </SPAN>
  220.     
  221.     <!-- escaped characters which are treated as normal text -->
  222.     <SEQ TYPE="LITERAL2">\&</SEQ>
  223.     <SEQ TYPE="LITERAL2">\$</SEQ>
  224.     <SEQ TYPE="LITERAL2">\%</SEQ>
  225.     
  226.     <!-- special tokens: macro parameter, linebreak, alignment tab -->
  227.     <SEQ_REGEXP TYPE="DIGIT">#[1-9]</SEQ_REGEXP>
  228.     <SEQ TYPE="KEYWORD3">\\</SEQ>
  229.     <SEQ TYPE="KEYWORD3">&</SEQ>
  230.     
  231.     <!-- labels -->
  232.     <MARK_FOLLOWING TYPE="LABEL" MATCH_TYPE="KEYWORD4">\label{</MARK_FOLLOWING>
  233.     
  234.     <!-- comments -->
  235.     <EOL_SPAN TYPE="COMMENT1">%</EOL_SPAN>
  236.   </RULES>
  237.   
  238.   <!-- verbatim rules -->
  239.   <RULES SET="VerbatimRules" DEFAULT="LITERAL3" />
  240.   
  241.   <!-- label rules -->
  242.   <RULES SET="LabelRules" DEFAULT="LABEL" />
  243.  
  244. </MODE>
  245.  
  246.